package net.zjitc.service;

import net.zjitc.pojo.User;
import net.zjitc.usermapper.UserMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

@Service
public class UserService {
    @Autowired
    private UserMapper userMapper;
    @Transactional
    public void saveUser(User user){
        User user1=new User();
        user1.setName("user1name");
        System.out.println("save user");
    }
    public User queryById(long id){
        System.out.println("save user");

        return userMapper.selectByPrimaryKey(id);
    }

}
